<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>
    	<c:choose>
       		<c:when test="${orderInfo.orderType==1}">
       			账单详情
       		</c:when>
       		<c:when test="${orderInfo.orderType==3}">
       			账单详情
       		</c:when>
       		<c:when test="${orderInfo.orderType==5}">
       			金币转账
       		</c:when>
       		<c:when test="${orderInfo.orderType==6}">
       			账单详情
       		</c:when>
       		<c:when test="${orderInfo.orderType==7}">
       			账单详情
       		</c:when>
       	</c:choose>
    </title>
	<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
	<meta name = "format-detection" content = "telephone=no">
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/index.css">
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/pay-details.css">

  </head>
  
  <body>
    <section class="pay-details">
	 	<div class="p-d">
	 		<strong>付款成功!</strong>
            <h5>¥<fmt:formatNumber value="${orderInfo.payMoney/100 }"  pattern="#0.00"/></h5>
            
            <c:if test="${orderInfo.orderType==1 || orderInfo.orderType == 3}">
            	<p>原价¥<fmt:formatNumber value="${orderInfo.allMoney/100 }" pattern="#0.00" /></p>
            </c:if>
            <c:if test="${orderInfo.orderType==1 || orderInfo.orderType == 3}">
            	<div class="stro-name"><img src="${sellerInfo.sellerHead }" alt=""><!-- 商家图片 --><span>${sellerInfo.sellerName }</span></div>
            </c:if>
            <c:if test="${orderInfo.orderType==5 || orderInfo.orderType == 6}">
            	<div class="stro-name"><img src="${userInfo.imageHead }" alt=""><!-- 商家图片 --><span>${userInfo.nickname }</span></div>
            </c:if>
            
            <div class="types"> 类型说明<span>
            	<c:choose>
            		<c:when test="${orderInfo.orderType==1}">
            			任务订单
            		</c:when>
            		<c:when test="${orderInfo.orderType==3}">
            			优惠买单
            		</c:when>
            		<c:when test="${orderInfo.orderType==5}">
            			金币转账
            		</c:when>
            		<c:when test="${orderInfo.orderType==6}">
            			金币充值
            		</c:when>
            		<c:when test="${orderInfo.orderType==7}">
            			活动报名
            		</c:when>
            	</c:choose>
            </span></div>
            <ul class="de-list">
                <li>
                    创建时间<span><fmt:formatDate value="${orderInfo.orderTime }" pattern="yyyy-MM-dd HH:mm" /></span>
                </li>
                <li>
                    支付订单号<span>${orderInfo.orderCode }</span>
                </li>
                <c:if test="${orderInfo.orderType==1 || orderInfo.orderType == 3}">
                <li>
                   	 商户订单号<span>${orderSeller.orderCode }</span>
                </li>
                </c:if>
                <c:choose>
                	<c:when test="${orderInfo.payType == 1 }">
                		<li>
                    		付款方式<span class="pay-good">金币</span>
                		</li>
                	</c:when>
                	<c:when test="${orderInfo.payType == 2 }">
                		<li>
                    		付款方式<span class="pay-weix">微信</span>
                		</li>
                	</c:when>
                	<c:when test="${orderInfo.payType == 3 }">
                		<li>
                    		付款方式<span class="pay-ali">支付宝</span>
                		</li>
                	</c:when>
                </c:choose>
            </ul>
            <c:if test="${orderInfo.orderType == 1 && orderInfo.orderStatus == 1 }">
            	<div class="reward" onclick="h5_toGoldDonation()">
                	打赏对方  <span style="cursor: pointer;">去打赏</span>
            	</div>
            </c:if>
            
            
           	<c:choose>
           		<c:when test="${orderInfo.orderType == 1 && orderInfo.orderStatus != 2 }">
           			<div class="eval" onclick="h5_toComtShopAndUser()"><div class="eval-star"></div>  <span style="cursor: pointer;">去评价</span></div>
           		</c:when>
           		<%-- <c:when test="${orderInfo.orderType == 1 && orderInfo.orderStatus == 2 }">
           			<div class="eval"><div class="eval-star"></div>  <span >去评价</span></div>
           		</c:when> --%>
           		<c:when test="${orderInfo.orderType == 3  && orderInfo.orderStatus != 2 }">
           			<div class="eval" onclick="h5_toComtShop()"><div class="eval-star"></div>  <span style="cursor: pointer;">去评价</span></div>
           		</c:when>
           		<%-- <c:when test="${orderInfo.orderType == 3  && orderInfo.orderStatus == 2 }">
           			<div class="eval"><div class="eval-star"></div>  <span>去评价</span></div>
           		</c:when> --%>
           	</c:choose>
	 	</div>
	 </section>
	 
	 <script type="text/javascript">
	 	function h5_toComtShopAndUser(){
	 		if(${otherInfo.id != ''}){
	 			location.href = "h5_toComtShopAndUser?id=${taskInfo.id}&sellerInfoId=${sellerInfo.id}&sellerInfoName=${sellerInfo.sellerName}&otherUserId=${otherInfo.id}&othernickName=${otherInfo.nickname}&orderId=${orderInfo.id}";
	 		}else{
	 			location.href = "h5_toComtShopAndUser";
	 		}
	 	}
	 	
	 	function h5_toComtShop(){
	 		if(${sellerInfo.id != ''}){
	 			location.href = "h5_toComtSeller?sellerInfoId=${sellerInfo.id}&sellerInfoName=${sellerInfo.sellerName}&orderId=${orderInfo.id}";
	 		}else{
	 			location.href = "h5_toComtSeller";
	 		}
	 	}
	 	
	 	function h5_toGoldDonation(){
	 		if(${taskInfo.id != ''}){
	 			location.href = "h5_toGoldDonation?id=${taskInfo.id}";
	 		}else{
	 			location.href = "h5_toGoldDonation";
	 		}
	 	}
	 </script>
	 
  </body>
</html>
